/* File: exPoly.cpp Author: Katherine Gibson (gibsonk@seas) Desc: example of using polymorphism in main() */ using namespace std; #include #include #include "poly.h" int main() { /* STEP 1 - declare objects */ /* STEP 2 - ask to eat, speak, and perform */ /***********************************************/ /* STEP 3 - create a vector of Animal pointers */ /* STEP 4 - add objects to the vector */ /* STEP 5 - ask to eat, speak, and perform */ /************************************************************/ /* STEP 6 - inside poly.h make Perform() a virtual function */ /***************************************************************/ /* STEP 7 - inside poly.h make ONLY Speak() a virtual function */ /*************************************************************/ /* STEP 8 - inside poly.h make Eat() a PURE virtual function */ return 0; }